package com.mapper;

import com.domain.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {
    @Select("SELECT * FROM t_admin WHERE id =#{id}")
    public Admin findById(Integer id);

    @Insert("INSERT INTO t_admin(admin_name,pwd,phone values (#{adminName},#{pwd},#{phone})")
    public int insertUser(Admin admin);

    @Select("SELECT * FROM t_admin WHERE admin_name=#{adminName} and pwd=#{pwd}")
    public Admin userLogin(Admin admin);
}
